package com.ruoyi.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 全局配置类
 * 
 * @author ruoyi
 */
@Component
@ConfigurationProperties(prefix = "ruoyi")
public class Global
{
    /** 项目名称 */
    private static String name;

    /** 版本 */
    private static String version;

    /** 版权年份 */
    private static String copyrightYear;

    /** 实例演示开关 */
    private static boolean demoEnabled;

    /** 上传路径 */
    private static String profile;

    /** 获取地址开关 */
    private static boolean addressEnabled;
    
  //小程序配置
  	/** 小程序appid */
  	private  String wxAppId;
  	/** 小程序秘钥 */
  	private  String wxSecret;
  	/** 获取Web_access_tokenhttps的请求地址 */
  	private  String wxWebAccessTokenhttps;
  	/** 拉取用户信息的请求地址 */
  	private  String wxUserMessage;
  	/** 获取code的请求地址     */
  	private  String wxGetCode;
  	//腾讯云配置
  	/** 短信应用 SDK AppID     */
  	private  String qcloudsmsAppid;
  	/** 短信应用 SDK AppKey     */
  	private  String qcloudsmsAppkey;
  	/** 签名     */
  	private  String qcloudsmsSmsSign;
  	/** 是否启用     */
  	private  boolean qcloudsmsEnable;

    public static String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        Global.name = name;
    }

    public static String getVersion()
    {
        return version;
    }

    public void setVersion(String version)
    {
        Global.version = version;
    }

    public static String getCopyrightYear()
    {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear)
    {
        Global.copyrightYear = copyrightYear;
    }

    public static boolean isDemoEnabled()
    {
        return demoEnabled;
    }

    public void setDemoEnabled(boolean demoEnabled)
    {
        Global.demoEnabled = demoEnabled;
    }

    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        Global.profile = profile;
    }

    public static boolean isAddressEnabled()
    {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled)
    {
        Global.addressEnabled = addressEnabled;
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath()
    {
        return getProfile() + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }

	public String getWxAppId() {
		return wxAppId;
	}

	public void setWxAppId(String wxAppId) {
		this.wxAppId = wxAppId;
	}

	public String getWxSecret() {
		return wxSecret;
	}

	public void setWxSecret(String wxSecret) {
		this.wxSecret = wxSecret;
	}

	public String getWxWebAccessTokenhttps() {
		return wxWebAccessTokenhttps;
	}

	public void setWxWebAccessTokenhttps(String wxWebAccessTokenhttps) {
		this.wxWebAccessTokenhttps = wxWebAccessTokenhttps;
	}

	public String getWxUserMessage() {
		return wxUserMessage;
	}

	public void setWxUserMessage(String wxUserMessage) {
		this.wxUserMessage = wxUserMessage;
	}

	public String getWxGetCode() {
		return wxGetCode;
	}

	public void setWxGetCode(String wxGetCode) {
		this.wxGetCode = wxGetCode;
	}

	public String getQcloudsmsAppid() {
		return qcloudsmsAppid;
	}

	public void setQcloudsmsAppid(String qcloudsmsAppid) {
		this.qcloudsmsAppid = qcloudsmsAppid;
	}

	public String getQcloudsmsAppkey() {
		return qcloudsmsAppkey;
	}

	public void setQcloudsmsAppkey(String qcloudsmsAppkey) {
		this.qcloudsmsAppkey = qcloudsmsAppkey;
	}

	public String getQcloudsmsSmsSign() {
		return qcloudsmsSmsSign;
	}

	public void setQcloudsmsSmsSign(String qcloudsmsSmsSign) {
		this.qcloudsmsSmsSign = qcloudsmsSmsSign;
	}

	public boolean isQcloudsmsEnable() {
		return qcloudsmsEnable;
	}

	public void setQcloudsmsEnable(boolean qcloudsmsEnable) {
		this.qcloudsmsEnable = qcloudsmsEnable;
	}
}
